<!-- 登录弹窗 -->
<style>
    .comment_shadow{width: 100%;height: 100%;position: fixed;top: 0;z-index: 9999; display:none;}
    .comment_box{width: 300px;height: 150px;margin: 0 auto;margin-top: 200px;background-color:#a1a1bb;position: relative;padding:50px 10px 10px 10px;font-size: 20px;}
    .close_btn{
        position: absolute;
        right:5px;
        top:5px;
        background-color: #6d6767;
    }
    .comment_line{
        overflow: hidden;
    }
    .comment_item{
        float:left;
    }
    .item_name{
        width:90px;
        text-align: center;
    }
    .item_input{
        width:210px;
    }
    .comment_line input{
        font-size: 20px;
        width:100%;
    }
    .comment_button div{
        width: 100px;
        margin: 0 auto;
    }
    .comment_line button{
        font-size: 20px;
        width: 100px;
        margin-top:10px;
    }
    textarea{
        width:100%;
        height:100%;
    }
</style>
<div class="comment_shadow" >
    <div class="comment_box">
        <div class="close_btn" onclick="close_pop_comment()">关闭</div>
        <div class="comment_line">
        <textarea id="comment_value"></textarea>
        </div>
        <!-- 验证码 -->
            <!-- 懒得写 -->
        <!-- 验证码 -->
        <div class="comment_line comment_button">
                <div>
                    <button onclick="comment()">提交</button>
                </div>
        </div>
    </div>
</div>
<script>
    function pop_comment(){
        $(".comment_shadow").css("display","block");
    }
    
    //关闭弹窗
    function close_pop_comment(){
    $(".comment_shadow").css("display","none");
    }
    //登录
    function comment(){

        if($("#comment_value").val()==""){
            alert("请输入评论信息");
            return false;
        }

        $.post(
            "/controler.php",
            {
                handle:"comment",
                name:$("#login_user_name").html(),
                comment:$("#comment_value").val()
            },
            function(msg){
                if(msg=="done"){
                    location.reload();
                }
                else{
                    alert("系统出错");
                }
            }
        )
    }
</script>